import request from '../utils/http'

/**
 * 任务列表
 */
export const getDriverTasksListAPI = (data) => {
	return request({
	  url: "/driver/tasks/list",
	  method: "get",
	  data,
	});
};

/**
 * 任务详情
 */
export const getDriverTasksIdAPI = (jobId) => {
	return request({
	  url: `/driver/tasks/details/${jobId}`,
	
	});
};

/**
 * 延迟提货
 */
export const putDriverTasksIDelaydAPI = (delayTime,delayReason,id) => {
	return request({
	  url: `/driver/tasks/delay`,
		method: "put",
		data: {
			delayTime: delayTime,
			delayReason:delayReason,
			id: id,
	  }
	});
};

/**
 * 提货
 */
export const postDriverTasksdTakeDeliveryAPI = (id,cargoPickUpPictureList,cargoPictureList) => {
	return request({
	  url: `/driver/tasks/takeDelivery`,
		method: "post",
		data: {
			id: id,
			cargoPickUpPictureList: cargoPickUpPictureList,
			cargoPictureList:cargoPictureList
		}
	});
};